package com.city.service.city.impl;

import com.city.domain.city.CityCopnoteMaincontent;
import com.city.repository.city.CityCopnoteMaincontentRepository;
import com.city.service.city.CityCopnoteMaincontentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @deprecation: 记录主要内容分类表
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Service
public class CityCopnoteMaincontentServiceImpl implements CityCopnoteMaincontentService {

    @Autowired
    private CityCopnoteMaincontentRepository contentR;

    @Override
    public List<CityCopnoteMaincontent> getAll() {
        return contentR.getAll();
    }

    @Override
    public String findNameById(Integer mainContentId) {
        CityCopnoteMaincontent content = contentR.findOne(mainContentId);
        return content.getName();
    }
}
